# 存放元素
import allure
from selenium.webdriver.common.by import By
from base.base_page import Basspage


# yesmro商城前端


class WMS(Basspage):
    """关于登录页面元素"""
    # 手机号
    wms_login = (By.XPATH, '//*[@id="app"]/div[1]/div/div[2]/form/div[1]/div/div/div/input')
    # 验证码
    wms_code = (By.XPATH, '//*[@id="app"]/div[1]/div/div[2]/form/div[2]/div/div/div/div[1]/div/input')
    # 登录按钮
    wms_login_button = (By.XPATH, '//*[@id="app"]/div[1]/div/div[2]/form/div[3]/button/span')




    """首页+待拣货"""
    # 点击弹窗上的忽略
    wms_ignore = (By.XPATH, '/html/body/div[7]/div[2]/div/div/div/div/div[3]/button[1]/span')
    # 点击左上角刷新
    wms_refresh = (By.XPATH, '//*[@id="app"]/div[1]/div[1]/div[1]/div/div/a/img')
    # 点击待拣货
    wms_picking = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[4]/div[1]/div[1]/a')
    # 点击排除HAO
    wms_eliminate = (By.XPATH, '//label[contains(text(),"排除HA0")]')
    # 输入发货单号
    wms_order = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[5]/div/div/div/div/div[2]/div[1]/div[2]/div/input')
    # 输入拣货单
    wms_order_picking = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[5]/div/div/div/div/div[2]/div[1]/div[1]/div/input')
    # 点击搜索
    wms_search = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[5]/div/div/div/div/div[2]/div[1]/div[4]/button/span')
    # 获取返回的拣货单元素
    wms_gain_picking = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[5]/div/div/div/div/div[2]/ul/li/div/div[1]/a/span/span')
    # 点击拣货HVU区
    wms_HVU = (By.XPATH, '//span[contains(text(),"拣货HVU区")]')



    "进入待拣货，进行绑蓝"
    # 点击弹窗的确定
    wms_yes = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div[3]/button[2]/span')
    # 点击弹窗的取消
    wms_NO = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div[3]/button[1]/span')
    # 获取弹窗中的文本框
    wms_test = (By.XPATH, '/html/body/div[8]/div[2]/div/div/div[2]/div/div[1]/div[2]/div/input')
    # 点击开始拣货
    wms_go = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[1]/div[1]/div/button[2]/span')
    # 点击分配蓝子
    wms_basket = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[1]/div[1]/div/button/span')
    # 获取It测试品牌的元素，进行断言
    wms_IT_brand = (By.XPATH, '//td[contains(text(),"it--测试品牌 【测试用】测试组11专门测试用的测试专用")][1]')
    #获取库位号HU-1-1-1-1进行断言
    wms_HU_1 = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/ul/li[1]/div/table/tbody/tr[2]/td[1]/span')
    # 获取提交人元素进行断言
    wms_name = (By.XPATH, '//span[contains(text(),"拣货: 姜海欧")]')
    # 撤销SKU
    wms_backout01 = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/ul/li[1]/div/table/tbody/tr[5]/td[1]/div[2]/div[2]/button')
    wms_backout02 = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/ul/li[2]/div/table/tbody/tr[5]/td[1]/div[2]/div[2]/button')
    # 断言蓝号是否等于11111
    wms_Basket_number = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/ul/li[1]/div/table/tbody/tr[2]/td[1]/div/div[1]/span')


    """贱货单，开始拣货"""
    # 获取库位码和SKU码的文本框元素
    wms_warehouse_sku = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/table/tr[1]/td/div/input')

    # 点击确定
    wms_confirm1 = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/ul/li[1]/div/table/tbody/tr[5]/td[2]/button')
    wms_confirm2 = (By.XPATH, '//*[@id="app"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/ul/li[2]/div/table/tbody/tr[5]/td[2]/button')